package com.guohe3.just.controller;


import com.guohe3.just.DO.Feedback;
import com.guohe3.just.common.resp.ApiResult;
import com.guohe3.just.common.utils.RestUtil;
import com.guohe3.just.service.IFeedbackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 浦希成
 * @since 2018-12-30
 */
@RestController
@RequestMapping("api/feedback/")
@Api("反馈接口")
public class FeedbackController {
    @Autowired
    private IFeedbackService feedbackService;

    @PostMapping("/create")
    @ApiOperation("创建反馈")
    public ApiResult create(@RequestBody Feedback feedback) {
        feedbackService.create(feedback);
        return RestUtil.success("反馈成功", "反馈成功");
    }

}
